package com.itheima.patterns.builderpattern.prototype.shallowcopy1;

public class Client {
    public static void main(String[] args) throws CloneNotSupportedException {
        Person person1 = new Person(1, "小华", new Address(1, "北京"));
        Person person2 = (Person) person1.clone();
        System.out.println("person1: " + person1);
        System.out.println("person2: " + person2);
        System.out.println("person1.getName() == person2.getName() 的结果为: "
                + (person1.getName() == person2.getName()));
        System.out.println("person1 == person2 的结果为: " + (person1 == person2));
    }
}